<%@ page import="SeedBank.Purchase" %>



<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'commonName', 'error')} ">
	<label for="commonName">
		<g:message code="purchase.commonName.label" default="Common Name" />
		
	</label>
	<g:textField name="commonName" value="${purchaseInstance?.commonName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'endOfGrowingSeason', 'error')} required">
	<label for="endOfGrowingSeason">
		<g:message code="purchase.endOfGrowingSeason.label" default="End Of Growing Season" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="endOfGrowingSeason" precision="day"  value="${purchaseInstance?.endOfGrowingSeason}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'hardinessZone', 'error')} required">
	<label for="hardinessZone">
		<g:message code="purchase.hardinessZone.label" default="Hardiness Zone" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="hardinessZone" required="" value="${purchaseInstance.hardinessZone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'harvestingInformation', 'error')} ">
	<label for="harvestingInformation">
		<g:message code="purchase.harvestingInformation.label" default="Harvesting Information" />
		
	</label>
	<g:textField name="harvestingInformation" value="${purchaseInstance?.harvestingInformation}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'price', 'error')} required">
	<label for="price">
		<g:message code="purchase.price.label" default="Price" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="price" required="" value="${purchaseInstance.price}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'quantity', 'error')} required">
	<label for="quantity">
		<g:message code="purchase.quantity.label" default="Quantity" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="quantity" required="" value="${purchaseInstance.quantity}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'scientificName', 'error')} ">
	<label for="scientificName">
		<g:message code="purchase.scientificName.label" default="Scientific Name" />
		
	</label>
	<g:textField name="scientificName" value="${purchaseInstance?.scientificName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'specialRequirements', 'error')} ">
	<label for="specialRequirements">
		<g:message code="purchase.specialRequirements.label" default="Special Requirements" />
		
	</label>
	<g:textField name="specialRequirements" value="${purchaseInstance?.specialRequirements}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'startOfGrowingSeason', 'error')} required">
	<label for="startOfGrowingSeason">
		<g:message code="purchase.startOfGrowingSeason.label" default="Start Of Growing Season" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="startOfGrowingSeason" precision="day"  value="${purchaseInstance?.startOfGrowingSeason}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: purchaseInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="purchase.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${SeedBank.User.list()}" optionKey="id" required="" value="${purchaseInstance?.user?.id}" class="many-to-one"/>
</div>

